﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using HDTuyenChon.BL;
namespace HDTuyenChon
{
	public partial class AddToCart : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			
			try
			{
				string maPhim = Request.QueryString["MaPhim"];
				HDTuyenChon.BL.MyShoppingCart shoppingCart = new HDTuyenChon.BL.MyShoppingCart();
				shoppingCart.AddToCart(maPhim);
			}
			catch (Exception exp)
			{
				throw new Exception("AddToCart.cs - Page_Load - " + exp.Message.ToString(), exp);
			}
			if (Session["BackURL"] != null)
			{
				Response.Redirect(Session["BackURL"].ToString());
			}
			else
			{
				Response.Redirect("Default.aspx");
			}
		}
	}
}